using UnityEngine;
using UnityEngine.Pool;
public class Coin : MonoBehaviour
{
    private void OnCollisionEnter2D(Collision2D collision) // 碰撞检测
    {
        // Debug.Log(collision.gameObject.layer);
        if (collision.gameObject.layer == LayerMask.NameToLayer("Ground"))
        {
            //销毁
            // Destroy(gameObject);
            // pool.Release(gameObject);
            ObjectPool.Instance.PushObject(gameObject);
        }

    }
}